package com.ljb.nfc_demo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.ljb.nfc_demo.nfc.ReadActivity;
import com.ljb.nfc_demo.nfc.WriteActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initUI();
    }

    private void initUI() {
        findViewById(R.id.read).setOnClickListener(this);
        findViewById(R.id.write).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.read:
                ReadActivity.actionStart(this);
                break;
            case R.id.write:
                WriteActivity.actionStart(this);
                break;
        }
    }
}

















